#include "bo3d.h"

BBDECL Ogre::CompositorInstance* __stdcall o_addCompositor(Ogre::Viewport* vp, const char* compositor, int addPosition)
{
	Ogre::CompositorInstance* ci;

	try
	{
		ci = Ogre::CompositorManager::getSingleton().addCompositor(vp, Ogre::String(compositor), addPosition);
	}
	catch(Ogre::Exception &e)
	{
		std::cout << e.getDescription() << std::endl;
	}

	return ci;
}

BBDECL void __stdcall o_setCompositorEnabled(Ogre::Viewport* vp, const char* compositor, bool value)
{
	try
	{
		Ogre::CompositorManager::getSingleton().setCompositorEnabled(vp, Ogre::String(compositor), value);
	}
	catch(Ogre::Exception &e)
	{
		std::cout << e.getDescription() << std::endl;
	}
}
